/*
 * Copyright (c) 2025 CAX Conversion Project
 */
package com.comac.ins.bomt.domain.vo.convertor;

import com.alibaba.excel.util.StringUtils;
import com.comac.ins.bomt.domain.vo.SummaryStrengthBomVo;
import com.comac.ins.common.json.utils.JsonUtils;
import org.springframework.stereotype.Component;

/**
 * @author zhanghongyi
 * @date 2024/8/13 10:21
 * @description StrengthBomSummaryConvertor
 */
@Component
public class StrengthBomSummaryConvertor {
    public SummaryStrengthBomVo toVo(String str) {
        if (StringUtils.isBlank(str)) {
            return null;
        }
        return JsonUtils.parseObject(str, SummaryStrengthBomVo.class);
    }

    public String toDo(SummaryStrengthBomVo obj) {
        if (obj == null) {
            return null;
        }
        return JsonUtils.toJsonString(obj);
    }
}
